home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
amigaos4_only
/
ifxlite
/
imagefx3
/
rexx
/
designs.ifx
< prev
next >
Wrap
Text File
|
2004-08-03
|
2KB
|
90 lines
/*
* $VER: Designs 3.0 (13.2.98)
*
* Arexx program for the ImageFX image processing system.
* Written by Thomas Krehbiel
*
* This program will draw into the main buffer a series of random
* designs, demonstrating the use of the drawing tools from Arexx.
*
* 13.02.98 tek Fixed the error in the oval drawings.
*
*/
OPTIONS RESULTS
GetMain
IF result = "" THEN DO
/* create buffer if one doesn't exist. */
CreateBuffer 320 200 Force
GetMain
END
PARSE VAR result name width height depth
SaveUndo ; Redraw Off
LockInput
Message 'Drawing Points'
BeginBar 'Points' 100
DO i = 0 TO 99
Bar i
LockGUI
SetPalette '-1' RANDOM(0,255) RANDOM(0,255) RANDOM(0,255)
Point RANDOM(0,width-1) RANDOM(0,height-1)
UnlockGUI Quiet
END
EndBar
Redraw On ; Redraw ; Redraw Off
Message 'Drawing Lines'
BeginBar 'Lines' 30
DO i = 0 TO 29
Bar i
LockGUI
SetPalette '-1' RANDOM(0,255) RANDOM(0,255) RANDOM(0,255)
Line RANDOM(0,width-1) RANDOM(0,height-1) RANDOM(0,width-1) RANDOM(0,height-1)
UnlockGUI Quiet
END
EndBar
Redraw On ; Redraw ; Redraw Off
Message 'Drawing Boxes'
BeginBar 'Boxes' 30
DO i = 0 TO 29
Bar i
LockGUI
SetPalette '-1' RANDOM(0,255) RANDOM(0,255) RANDOM(0,255)
x = RANDOM(0,width-1)
y = RANDOM(0,height-1)
Box x y RANDOM(0,width-x-1) RANDOM(0,height-y-1)
UnlockGUI Quiet
END
EndBar
Redraw On ; Redraw ; Redraw Off
Message 'Drawing Ovals'
BeginBar 'Ovals' 30
DO i = 0 TO 29
Bar i
LockGUI
SetPalette '-1' RANDOM(0,255) RANDOM(0,255) RANDOM(0,255)
x = RANDOM(0,width-1)
y = RANDOM(0,height-1)
xr = RANDOM(0,width%2)
yr = RANDOM(0,height%2)
Oval x y xr yr
UnlockGUI Quiet
END
EndBar
UnlockInput
Redraw On ; Redraw
EXIT